import uni from '@dcloudio/vite-plugin-uni'
import { defineConfig } from "vite";
import { resolve } from 'path'
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';

export default defineConfig({
	plugins: [
		uni(),
		Components({
		      resolvers: [VantResolver()],
		}),
	],
	server: {
		proxy: {
			"/api": {
				target: "http://183.67.28.94:8889/",
				// "http://192.168.5.225:8898/api",
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/api/, ""),
			},
		},
	},
});
